﻿namespace CoolCode.Silverlight.Tests
{
    using System.Windows.Controls;
    using System.Windows.Navigation;
    using CoolCode.Silverlight.Tests.Resources;

    public partial class Home : Page
    {
        public Home()
        {
            InitializeComponent();

            this.Title = ApplicationStrings.HomePageTitle;
            btnLoad.Click += new System.Windows.RoutedEventHandler(btnLoad_Click);
        }

        void btnLoad_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            ProgressBar bar = new ProgressBar();
            bar.Width = 200.0;
            bar.Height = 100.0;
            bar.IsIndeterminate = true;
            bar.Visibility = System.Windows.Visibility.Visible;
            ContentStackPanel.Children.Add(bar);          
        }

        /// <summary>
        ///     Executes when the user navigates to this page.
        /// </summary>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
        }
    }
}